home *** CD-ROM | disk | FTP | other *** search
/ Introduction to 3D Game …ogramming with DirectX 12 / Introduction-to-3D-Game-Programming-with-DirectX-12.ISO / Code.Textures / Chapter 23 Character Animation / SkinnedMesh / Shaders / ShadowDebug.hlsl < prev    next >
Text File  |  2016-03-02  |  804b  |  38 lines

  1. //***************************************************************************************
  2. // ShadowDebug.hlsl by Frank Luna (C) 2015 All Rights Reserved.
  3. //***************************************************************************************
  4.  
  5. // Include common HLSL code.
  6. #include "Common.hlsl"
  7.  
  8. struct VertexIn
  9. {
  10.     float3 PosL    : POSITION;
  11.     float2 TexC    : TEXCOORD;
  12. };
  13.  
  14. struct VertexOut
  15. {
  16.     float4 PosH    : SV_POSITION;
  17.     float2 TexC    : TEXCOORD;
  18. };
  19.  
  20. VertexOut VS(VertexIn vin)
  21. {
  22.     VertexOut vout = (VertexOut)0.0f;
  23.  
  24.     // Already in homogeneous clip space.
  25.     vout.PosH = float4(vin.PosL, 1.0f);
  26.     
  27.     vout.TexC = vin.TexC;
  28.     
  29.     return vout;
  30. }
  31.  
  32. float4 PS(VertexOut pin) : SV_Target
  33. {
  34.     return float4(gSsaoMap.Sample(gsamLinearWrap, pin.TexC).rrr, 1.0f);
  35. }
  36.  
  37.  
  38.